package com.bwie.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @Author: TaoShiHao
 * @Date: 2025/5/21 15:43
 * @Description:
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class LoginVo implements Serializable {
    @NotBlank(message = "登陆账号不能为空")
    @Length(min =8,message = "用户名长度不小于8位")
    private String userName;
    @NotBlank(message = "登陆密码不能为空")
    @Pattern(regexp = "^(?=.*\\d)(?=.*[a-zA-Z])[a-zA-Z0-9]{6,}$",message = "密码长度不小于6位,且密码必须包含字母和数字")
    private String userPass;
}
